﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZHDJ.Data;
using ZHDJ.WebPage;
using ZHDJ.WebPage.Master;

namespace ZHDJ.Web.Portal.PartyRepresentative
{
    public partial class StudioInfo : UseMorePageMasterPage
    {

        /// <summary>
        /// 工作室ID
        /// </summary>
        private string StudioID
        {
            get
            {
                return this.Request["StudioID"] ?? "null";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }

        public void LoadData()
        {
            using (var DB = new DBInstance().DB)
            {
                var studio = DB.PartyRepresentativeStudios.Find(StudioID);
                if (studio == null)
                {
                    Response.Redirect("~/default.aspx");
                }
                ltContent.Text = studio.Summary;
            }
        }

        #region 模块菜单
        /// <summary>
        /// 初始化module  如果通过url传参可不设置
        /// </summary>
        protected override void InitModule()
        {
            Category = "PartyRepresentativeStudio";

        }
        #endregion
    }
}